<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <title>{$setup['dbtitle']} 微信地图导航</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">
    <link rel="stylesheet" href="{$_W['siteroot']}addons/weisrc_dish/template/assets/lib/weui.min.css">
    <link rel="stylesheet" href="{$_W['siteroot']}addons/weisrc_dish/template/assets/css/jquery-weui.css">
    <link rel="stylesheet" href="{$_W['siteroot']}addons/weisrc_dish/template/assets/css/style.css">
    <style>
    .info {
        padding: 10px;
        border: 1px solid rgb(4, 190, 2);
        background: rgb(240, 240, 240);
        font-size: 16px;
        line-height: 30px;
        margin-top: 40px;
        border-radius: 10px;
    }

    #title {
        font-size: 20px;
        font-weight: bold;
    }

    #qq_webmap,
    #openLocation {
        margin-top: 20px;
        font-size: 14px;
        line-height: 25px;
        width: 100%;
        height: 40px;
    }

    #openLocation,
    #tongji_code {
        display: none;
    }

    #detail {
     margin-top: 20px;
     margin-bottom: 20px;
    }
    </style>
  </head>
  <body>
    <div class="weui-content">
      <div class="weui-panel">
        <!--顶部轮播-->
        <div class="swiper-container swiper-banner">
          <div class="swiper-wrapper">
            {loop $slide $item}
            <div class="swiper-slide">
              <a href="{php echo $item['htmlurl']}"><img src="{php echo tomedia($item['imgurl'])}" /></a>
            </div>
            {/loop}           
          </div>
          <div class="swiper-pagination"></div>
        </div>
      </div>
      <div class="weui-panel">
        <div class="weui-panel__hd">
          <!-- <a href="tel:{$setup['tel']}" class="weui-cell weui-cell_access center-alloder"> -->
            <div class="weui-cell__bd wy-cell">
              <div class="weui-cell__hd"><img src="{$_W['siteroot']}addons/weisrc_dish/template/assets/images/center-icon-order-dfk.png" alt="" class="center-list-icon"></div>
              <a href="tel:{$setup['tel']}">
              <div class="weui-cell__bd weui-cell_primary">
                <p class="center-list-txt">{$setup['tel']}</p></a>
              </div>
              </a>
            </div>
            <!-- <span class="ord-status-txt fr" style="color: #ADADAD;">一键拨号</span> -->
          <!-- </a> -->
        </div>
        <div class="weui-panel__hd">
          <!-- <a href="{$setup['address']}" class="weui-cell weui-cell_access center-alloder"> -->
            <div class="weui-cell__bd wy-cell">
              <div class="weui-cell__hd"><img src="{$_W['siteroot']}addons/weisrc_dish/template/assets/images/center-icon-order-dpj.png" alt="" class="center-list-icon"></div>
              <div class="weui-cell__bd weui-cell_primary">
                <p class="center-list-txt">{$setup['address']}</p>
              </div>
            </div>
            <!-- <span class="ord-status-txt fr" style="color: #ADADAD;">一键导航</span> -->
          <!-- </a> -->
        </div>
        <div class="weui-panel__hd">
          <!-- <a href="{$setup['address']}" class="weui-cell weui-cell_access center-alloder"> -->
            <div class="weui-cell__bd wy-cell">
              <button class="weui-btn weui-btn_primary" id="openLocation"> 一键微信导航 </button>
            </div>
            <div class="weui-cell__bd wy-cell">
                <button class="weui-btn weui-btn_primary" id="qq_webmap"> 一键腾讯地图 </button>
            </div>
            <!-- <span class="ord-status-txt fr" style="color: #ADADAD;">一键导航</span> -->
          <!-- </a> -->
        </div>
      </div>
      <!-- <div class="weui-panel">
        <div class="weui-panel__hd">
          <div id="tab2" class="weui-tab__bd-item ">
            <div class="pro-detail">
              {php echo htmlspecialchars_decode($setup['content']);}
            </div>
          </div>
        </div>
      </div> -->
    </div>
    <!--底部导航-->
    <div class="foot-black"></div>
    <div class="weui-tabbar wy-foot-menu">
      <a href="{php echo $this->createMobileurl('index')}" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-home"></div>
        <p class="weui-tabbar__label">公司首页</p>
      </a>
      <a href="tel:{$setup['tel']}" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-list"></div>
        <p class="weui-tabbar__label">一键拨号</p>
      </a>
      <a href="{php echo $this->createMobileurl('daohang')}" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon foot-menu-cart"></div>
        <p class="weui-tabbar__label">一键导航</p>
      </a>
      <a href="{php echo $this->createMobileurl('aboutus')}" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-member"></div>
        <p class="weui-tabbar__label">关于我们</p>
      </a>
    </div>
    <script src="{$_W['siteroot']}addons/weisrc_dish/template/assets/lib/jquery-2.1.4.js"></script>
    <script src="{$_W['siteroot']}addons/weisrc_dish/template/assets/lib/fastclick.js"></script>
    <script src="{$_W['siteroot']}addons/weisrc_dish/template/assets/js/jquery-weui.js"></script>
    <script src="{$_W['siteroot']}addons/weisrc_dish/template/assets/js/swiper.js"></script>
    <script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
function is_weixn() {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.match(/MicroMessenger/i) == "micromessenger") {
        return true;
    } else {
        return false;
    }
}
var descs = document.querySelector('#metaDescription') ? document.querySelector('#metaDescription').content : '';
var title = document.title;
var imgUrl = "{php echo tomedia($share['imgurl']);}";
var qqMapUrl = "//apis.map.qq.com/uri/v1/marker?marker=coord:{$setup['pos_qq'][0]},{$setup['pos_qq'][1]};title:{$setup['title']};addr:{$setup['address']}";
var autoJump = {$setup['jump']};
var link = "<?=$_W['siteroot'].'app/'.$this->createmobileurl('daohang',array('setupid'=>$row['setupid']));?>";
var jssdk = {$jssdk};
jssdk.debug = Boolean({$setup['is_debug']});
jssdk.jsApiList = ['openLocation', 'getLocation', 'onMenuShareTimeline', 'onMenuShareQQ', 'onMenuShareAppMessage'];
wx.config(jssdk);
wx.ready(function() {
    wx.onMenuShareAppMessage({
        title: title,
        desc: descs,
        link: link,
        imgUrl: imgUrl,
    });
    wx.onMenuShareTimeline({
        title: title,
        link: link,
        imgUrl: imgUrl,
    });
    wx.onMenuShareQQ({
        title: title,
        desc: descs,
        link: link,
        imgUrl: imgUrl,
    });
    if (autoJump) {
        $("#openLocation").trigger('click');
    }
});
$("#openLocation").click(function() {
        wx.openLocation({
            latitude: {$setup['pos_qq'][0]},
            longitude: {$setup['pos_qq'][1]},
            name: "{$setup['title']}",
            address: "{$setup['address']}",
            scale: {$setup['scale']},
            infoUrl: "{$setup['url']}"
        });
    })
    $("#qq_webmap").click(function() {
        location.href = qqMapUrl;
    })
window.onload = function() {
    if (is_weixn()) {
        $("#openLocation").show();
    } else {
        if (autoJump) {
            $("#qq_webmap").trigger('click');
        }
    }
}
</script>
    <script>
      $(".swiper-banner").swiper({
        loop: true,
        autoplay: 4000
      });
      $(".swiper-news").swiper({
        loop: true,
        direction: 'vertical',
        paginationHide: true,
        autoplay: 30000
      });
      $(".swiper-jingxuan").swiper({
        pagination: '.swiper-pagination',
        loop: true,
        paginationType: 'fraction',
        slidesPerView: 3,
        paginationClickable: true,
        spaceBetween: 2
      });
      $(".swiper-jiushui").swiper({
        pagination: '.swiper-pagination',
        paginationType: 'fraction',
        loop: true,
        slidesPerView: 3,
        slidesPerColumn: 2,
        paginationClickable: true,
        spaceBetween: 2
      });
    </script>

  </body>

</html>